/**
 * Author: Jackin (qin.zhang@uni.lu)
 * Date: 2013
 * (c) 2013 University of Luxembourg - Interdisciplinary Centre for Security Reliability and Trust (SnT)
 * All rights reserved
 * GPLv3 to be found at: http://www.gnu.org/licenses/quick-guide-gplv3.html
 */

package lu.uni.geko.ext.ram;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import lu.uni.geko.resources.MainResourceLoader;
import lu.uni.geko.util.datastructures.BiHashN2NMap;
import lu.uni.geko.util.datastructures.BiN2NMap;
import lu.uni.geko.weaver.Advice;
import lu.uni.geko.weaver.AdviceEffectuation;
import lu.uni.geko.weaver.HashMappedAdviceEffectuation;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;

/**
 *
 *
 * @author Jackin
 *
 */
public final class RamAdviceEffectuationCalculator
{
	private Map<EObject, EObject> equivalence;
	private Set<EObject> baseElementsToRemove;
	private Set<EObject> avElementsToAdd;
	private BiN2NMap<EObject, EObject> base2AdviceMergeBiN2NMap;

	public RamAdviceEffectuationCalculator()
	{
		this.equivalence = new HashMap<EObject, EObject>();
		this.baseElementsToRemove = new HashSet<EObject>();
		this.avElementsToAdd = new HashSet<EObject>();
		this.base2AdviceMergeBiN2NMap = new BiHashN2NMap<EObject, EObject>();
	}
	
	public final AdviceEffectuation calculateAdviceEffectuation(ram.Aspect base, ram.Aspect dependent, ram.Instantiation instantiation, Advice advice)
	{
		calculateAspect(base, dependent, advice);
		
		calculateStructuralView(base, dependent, instantiation);
		
		
		return new HashMappedAdviceEffectuation(baseElementsToRemove, avElementsToAdd, base2AdviceMergeBiN2NMap);
	}
	
	private final void calculateStructuralView(ram.Aspect base, ram.Aspect dependent, ram.Instantiation instantiation)
	{
		
	}
	
	private final void calculateAspect(ram.Aspect base, ram.Aspect dependent, Advice advice)
	{
		dependent.setName(base.getName());
		
		
	}

}
